package org.groupg.practice.ejml;

import org.ejml.simple.SimpleMatrix;

public class EjmlDemo {
    public static void main(String[] args) {
        // 创建矩阵
        SimpleMatrix A = new SimpleMatrix(new double[][]{{1, 2}, {3, 4}});
        SimpleMatrix B = new SimpleMatrix(new double[][]{{5}, {6}});

        // 矩阵乘法
        SimpleMatrix C = A.mult(B);
        System.out.println("矩阵乘法结果:\n" + C);

        // 求逆矩阵
        SimpleMatrix AInverse = A.invert();
        System.out.println("逆矩阵:\n" + AInverse);
    }
}